package com.me.libgdx_test;

import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.me.libgdx_test.ClassUnlockablePrototypes.UnlockFactory;

public abstract class AbstractClassAchievement extends Actor{
	Image level_icon;
	Image honor_icon;
	Image gold_icon;
	int current_level;
	int current_honor;
	int current_gold;
	ActivityMain game;
	ClassSkinReference skin;
	Point dimensions;
	Group achievement_group;
	ClassLogDisplay logger;
	UnlockFactory factory;
	AbstractClassAchievement(ActivityMain game, Point dimensions){
		logger = new ClassLogDisplay("AbstractClassAchievement");
		logger.print("Achievement Init");
		skin = game.skin;
		this.dimensions = dimensions;
		ClassTexturePackerLoader sprite_textures = game.sprite_textures;
		level_icon = new Image(sprite_textures.find_by_name("icon_levels"));
		honor_icon = new Image(sprite_textures.find_by_name("icon_banner"));
		gold_icon = new Image(sprite_textures.find_by_name("icon_gold"));
		factory = game.unlockable.get_unlockable_prototypes().get_factory();
		achievement_group = new Group();
		refresh_achievements();
	}
	public void refresh_achievements(){
		logger.print("Refresh Achievements");
		achievement_group.clear();
		current_level = factory.get_current_level();
		current_honor = factory.get_player_info("honor");
		current_gold = factory.get_player_info("gold");
	}
}
